﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using AimGameLibrary;

namespace AimGameEngine
{
    public class NodeList
    {
        //public List<NodeData> ListNode;
        public Dictionary<String, NodeData> ListNode;
        public ImageList imagelist;
        
        public NodeList()
        {
            #region Imagelist
            imagelist = new ImageList();
            //this.BuildButton.Image = global::AimGameEngine.Properties.Resources.building_go;
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.folder);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.tag_yellow);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.tag_orange);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.tag_red);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.tag_pink);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.tag_purple);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.tag_green);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.tag_blue);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.tag_blue_add);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.images);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.font);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.photo);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.comment);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.script_lightning);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.bricks);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.monitor_edit);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.monitor_lightning);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.camera);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.music);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.film);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.user);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.world);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.shape_ungroup);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.keyboard);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.controller);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.add);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.Subtraction);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.Multiply);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.Divition);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.Remainder);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.control_pause);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.sitemap);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.server_link);
            imagelist.Images.Add(global::AimGameEngine.Properties.Resources.shape_handles);
            #endregion

            #region NodeList
            ListNode = new Dictionary<string, NodeData>();
            // Problem to Chance Name
            ListNode.Add("Value", new NodeData("Value", 0, 0, NodeTypeValue.Root));
                ListNode.Add(NodeTypeValue.Boolean.ToString(), new NodeData(NodeTypeValue.Boolean.ToString(), 1, 0, NodeTypeValue.Boolean,1 , EditorSetting.Default.Detail_Boolean));
                ListNode.Add(NodeTypeValue.Int.ToString(), new NodeData(NodeTypeValue.Int.ToString(), 1, 1, NodeTypeValue.Int, 2, EditorSetting.Default.Detail_Int));
                ListNode.Add(NodeTypeValue.Float.ToString(), new NodeData(NodeTypeValue.Float.ToString(), 1, 2, NodeTypeValue.Float, 3, EditorSetting.Default.Detail_Float));
                ListNode.Add(NodeTypeValue.Vector2.ToString(), new NodeData(NodeTypeValue.Vector2.ToString(), 1, 3, NodeTypeValue.Vector2, 4, EditorSetting.Default.Detail_Vector2));
                ListNode.Add(NodeTypeValue.Rectangle.ToString(), new NodeData(NodeTypeValue.Rectangle.ToString(), 1, 4, NodeTypeValue.Rectangle, 5, EditorSetting.Default.Detail_Rectangle));
                //ListNode.Add(NodeTypeValue.String.ToString(), new NodeData(NodeTypeValue.String.ToString(), 1, 5, NodeTypeValue.String,6));
                ListNode.Add(NodeTypeValue.Color.ToString(), new NodeData(NodeTypeValue.Color.ToString(), 1, 6, NodeTypeValue.Color, 7, EditorSetting.Default.Detail_Color));
                ListNode.Add(NodeTypeValue.SpriteEffects.ToString(), new NodeData(NodeTypeValue.SpriteEffects.ToString(), 1, 7, NodeTypeValue.SpriteEffects, 8, EditorSetting.Default.Detail_SpriteEffects));

            ListNode.Add("Resource", new NodeData("Resource", 0, 2, NodeTypeValue.Root));
                ListNode.Add(NodeTypeValue.Texture2D.ToString(), new NodeData(NodeTypeValue.Texture2D.ToString(), 1, 0, NodeTypeValue.Texture2D, 9, EditorSetting.Default.Detail_Texture2D));
                //ListNode.Add(NodeTypeValue.SpriteFont.ToString(), new NodeData(NodeTypeValue.SpriteFont.ToString(), 1, 1, NodeTypeValue.SpriteFont,10));

            ListNode.Add("Sprite",new NodeData("Sprite",0,1, NodeTypeValue.Root));
                ListNode.Add(NodeTypeValue.DrawSprite.ToString(), new NodeData(NodeTypeValue.DrawSprite.ToString(), 1, 0, NodeTypeValue.DrawSprite, 11, EditorSetting.Default.Detail_DrawSprite));
                //ListNode.Add(NodeTypeValue.DrawString.ToString(), new NodeData(NodeTypeValue.DrawString.ToString(), 1, 1, NodeTypeValue.DrawString,12));
                ListNode.Add(NodeTypeValue.Animation2D.ToString(), new NodeData(NodeTypeValue.Animation2D.ToString(), 1, 2, NodeTypeValue.Animation2D, 13, EditorSetting.Default.Detail_Animation2D));

            ListNode.Add("Management", new NodeData("Management", 0, 3, NodeTypeValue.Root));
                ListNode.Add(NodeTypeValue.Screen.ToString(), new NodeData(NodeTypeValue.Screen.ToString(), 1, 0, NodeTypeValue.Screen, 14, EditorSetting.Default.Detail_Screen));
                ListNode.Add(NodeTypeValue.ScreenControl.ToString(), new NodeData(NodeTypeValue.ScreenControl.ToString(), 1, 1, NodeTypeValue.ScreenControl, 32, EditorSetting.Default.Detail_ScreenControl));
                ListNode.Add(NodeTypeValue.Update.ToString(), new NodeData(NodeTypeValue.Update.ToString(), 1, 2, NodeTypeValue.Update, 15, EditorSetting.Default.Detail_Update));
                ListNode.Add(NodeTypeValue.Draw.ToString(), new NodeData(NodeTypeValue.Draw.ToString(), 1, 3, NodeTypeValue.Draw, 16, EditorSetting.Default.Detail_Draw));
                    
            ListNode.Add("SlideScoll", new NodeData("SlideScoll", 0, 4, NodeTypeValue.Root));
                ListNode.Add(NodeTypeValue.Camera.ToString(), new NodeData(NodeTypeValue.Camera.ToString(), 1, 0, NodeTypeValue.Camera, 17, EditorSetting.Default.Detail_Camera));
                ListNode.Add(NodeTypeValue.TackCamera.ToString(), new NodeData(NodeTypeValue.TackCamera.ToString(), 1, 1, NodeTypeValue.TackCamera, 33, EditorSetting.Default.Detail_TackCamera));

            ListNode.Add("Sound", new NodeData("Sound", 0, 5, NodeTypeValue.Root));
                ListNode.Add(NodeTypeValue.IrrklangPlayer.ToString(), new NodeData(NodeTypeValue.IrrklangPlayer.ToString(), 1, 0, NodeTypeValue.IrrklangPlayer, 18, EditorSetting.Default.Detail_IrrklangPlayer));

            ListNode.Add("Video", new NodeData("Video", 0, 6, NodeTypeValue.Root));
                ListNode.Add(NodeTypeValue.VideoPlayer.ToString(), new NodeData(NodeTypeValue.VideoPlayer.ToString(), 1, 0, NodeTypeValue.VideoPlayer, 19, EditorSetting.Default.Detail_VideoPlayer));

            ListNode.Add("Physics", new NodeData("Physics", 0, 6, NodeTypeValue.Root));
                ListNode.Add(NodeTypeValue.Body.ToString(), new NodeData(NodeTypeValue.Body.ToString(), 1, 0, NodeTypeValue.Body, 20, EditorSetting.Default.Detail_Body));
                ListNode.Add(NodeTypeValue.Gravity.ToString(), new NodeData(NodeTypeValue.Gravity.ToString(), 1, 0, NodeTypeValue.Gravity, 21, EditorSetting.Default.Detail_Gravity));
                ListNode.Add(NodeTypeValue.Collision.ToString(), new NodeData(NodeTypeValue.Collision.ToString(), 1, 0, NodeTypeValue.Collision, 22, EditorSetting.Default.Detail_Collision));

            ListNode.Add("Controller", new NodeData("Controller", 0, 7, NodeTypeValue.Root));
                ListNode.Add(NodeTypeValue.KeyController.ToString(), new NodeData(NodeTypeValue.KeyController.ToString(), 1, 0, NodeTypeValue.KeyController, 23, EditorSetting.Default.Detail_KeyController));
                ListNode.Add(NodeTypeValue.ButtonController.ToString(), new NodeData(NodeTypeValue.ButtonController.ToString(), 1, 0, NodeTypeValue.ButtonController, 24, EditorSetting.Default.Detail_ButtonController));

            ListNode.Add("Operator", new NodeData("Operator", 0, 8, NodeTypeValue.Root));
                ListNode.Add(NodeTypeValue.AddValue.ToString(), new NodeData(NodeTypeValue.AddValue.ToString(), 1, 0, NodeTypeValue.AddValue, 25, EditorSetting.Default.Detail_AddValue));
                ListNode.Add(NodeTypeValue.SubtracValue.ToString(), new NodeData(NodeTypeValue.SubtracValue.ToString(), 1, 0, NodeTypeValue.SubtracValue, 26, EditorSetting.Default.Detail_SubtracValue));
                ListNode.Add(NodeTypeValue.MultiplyValue.ToString(), new NodeData(NodeTypeValue.MultiplyValue.ToString(), 1, 0, NodeTypeValue.MultiplyValue, 27, EditorSetting.Default.Detail_MultiplyValue));
                ListNode.Add(NodeTypeValue.DivisionValue.ToString(), new NodeData(NodeTypeValue.DivisionValue.ToString(), 1, 0, NodeTypeValue.DivisionValue, 28, EditorSetting.Default.Detail_DivisionValue));
                ListNode.Add(NodeTypeValue.RemainderValue.ToString(), new NodeData(NodeTypeValue.RemainderValue.ToString(), 1, 0, NodeTypeValue.RemainderValue, 29, EditorSetting.Default.Detail_RemainderValue));
                ListNode.Add(NodeTypeValue.EqualsValue.ToString(), new NodeData(NodeTypeValue.EqualsValue.ToString(), 1, 0, NodeTypeValue.EqualsValue, 30, EditorSetting.Default.Detail_EqualsValue));

            ListNode.Add("Condition", new NodeData("Condition", 0, 9, NodeTypeValue.Root));
                ListNode.Add(NodeTypeValue.IfElse.ToString(), new NodeData(NodeTypeValue.IfElse.ToString(), 1, 0, NodeTypeValue.IfElse, 31, EditorSetting.Default.Detail_IfElse));
            #endregion
        }

    }

}
